<h2>{{message}}</h2>
<h2>{{getInfo()}}</h2>
<h2>{{a == b ? '相等': '不等'}}</h2>
<h2>{{'Hello Angular'}}</h2>
<p [innerHTML]="htmlSnippet"></p>
<div [attr.data]="true">1</div>
<button class="btn btn-primary" [class.active]="true">按钮</button>
<div [ngClass]="{'active': true, 'error': true}">嗨呀</div>
<button [style.backgroundColor]="true ? 'blue': 'red'">按钮</button>
<button [ngStyle]="{'backgroundColor': 'red'}">按钮</button>
<button (click)="onSave($event)">按钮</button>
<!-- 当按下回车键抬起的时候执行函数 -->
<input type="text" (keyup.enter)="onKeyUp($event)"/>

<br/>
获取原生 DOM 对象
<!--<input type="text" (keyup.enter)="onKeyUp($event)" #username/>-->

<p #paragraph>home works!</p>

<ul>
    <li #items>a</li>
    <li #items>b</li>
    <li #items>c</li>
</ul>

<input type="text" [(ngModel)]="username" />
<button (click)="change()">在组件类中更改 username</button>
<div>username: {{ username }}</div>

<span *ngIf="task.person">{{ task.person.name }}</span>
<span>{{ task.person?.name }}</span>